home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Feedbacks and Questions - ODF R1
- Sent: 5/18/96 2:03 AM
- Received: 5/22/96 8:31 AM
- From: Shinsaku Akogi, ak3s-akg@asahi-net.or.jp
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
-
- >>"ODFButton" is
- >>rounded corner gadget, but when dropped on the document, it's rectangle.
- >>( That happens when the document's color is not white, as you know.) Is there
- >>a way to fix that with modification or should I wait for the next version?
- >
- >ODFButton doesn't even try to support that. The way to fix it to set the
- >used shape using a rounded rectangle instead of a rectangle. Look at the
- >OpenDoc programmer's guide about the used shape. You don't need to wait
- >for the next release of ODF to fix that.
-
- Hello,
- Given the suggestions above, I tried to modify ODFButton.
- I've read about used shape in OpenDoc Programmer's guide, but I was not
- sure where to put the methods like ChangeUsedShape and UsedShapeChanged
- ( Are these used in ODF? ). So what I did is modifying Draw method just as
- the same as ODFClock does.
-
- void CButtonFrame::Draw(Environment* ev, ODFacet* facet,
- ODShape* invalidShape)
- {
- FW_CViewContext fc(ev, NULL, facet, invalidShape);
-
- // Just erase before the button draws itself
- if (IsRoot(ev))
- {
- FW_CRect invalidRect;
- fc.GetClipRect(invalidRect);
- FW_CRectShape::RenderRect(fc, invalidRect, FW_kFill,
-
- FW_kWhiteEraseInk);
- }
- fc.SetMapping(fMapping);
-
- this->DrawButtonFace(ev, fc);
- }
- void CButtonFrame::DrawButtonFace(Environment* ev,
- FW_CGraphicContext& gc)
- {
- FW_CRect ovalRect;
-
- FW_COvalShape::RenderOval(
- gc,
- ovalRect,
- FW_kFill,
- FW_kWhiteEraseInk);
- }
- Although I tried with roundRect, CW8 reports errors about FW_kFrame and
- FW_kFill so I just did it to see what's gonna happen with oval. It just worked
- fine. But, still I feel I might be doing something wrong. Please give me any
- comments or suggestions.
-
- Shinsaku Akogi ( ak3s-akg@asahi-net.or.jp )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-